projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0709e03
)
Avoid crashes when the primary clip is empty
author
Po Lu
<luangruo@yahoo.com>
Fri, 28 Jul 2023 07:24:47 +0000
(15:24 +0800)
committer
Po Lu
<luangruo@yahoo.com>
Fri, 28 Jul 2023 07:24:47 +0000
(15:24 +0800)
* src/androidselect.c (Fandroid_get_clipboard): Don't return
data if clipboard is empty. Reported by Johan Widén
<j.e.widen@gmail.com>.
src/androidselect.c
patch
|
blob
|
history
diff --git
a/src/androidselect.c
b/src/androidselect.c
index f537128045776ec7dc008f31ad79b237c3e4cf4d..9910e7921de0bed1110c734e6fe8d6af3aeec29a 100644
(file)
--- a/
src/androidselect.c
+++ b/
src/androidselect.c
@@
-194,6
+194,9
@@
Alternatively, return nil if the clipboard is empty. */)
method);
android_exception_check ();
+ if (!bytes)
+ return Qnil;
+
length = (*android_java_env)->GetArrayLength (android_java_env,
bytes);
data = (*android_java_env)->GetByteArrayElements (android_java_env,